/**
 * 
 */
package com.suyx.job.service.area.impl;

import org.springframework.stereotype.Service;

import com.suyx.job.entity.RoleInfo;
import com.suyx.job.entity.TuInfo;
import com.suyx.job.enums.SectEnums;
import com.suyx.job.utils.ScreenCapture;
import com.suyx.job.utils.SysStaticData;

/**
 * @author syx
 *
 */
@Service
public class GoToLgAreaServiceImpl extends AbstractAreaService{

	@Override
	public boolean execute(String device, String path, String area) {
		try {
			String[] infos = SysStaticData.AL1.get("龙宫").split("&");
			userAL1(device,infos);
			//点击NPC
			ScreenCapture.mouseClick(device, "804 313");
			Thread.sleep(1 * 1000L);
			//到达东海湾
			ScreenCapture.mouseClick(device, "1205 346");
			Thread.sleep(2 * 1000L);
			
			//点击地图
			ScreenCapture.mouseClick(device, "148 38");
			ScreenCapture.mouseClick(device, "981 245");
			//关闭地图
			ScreenCapture.mouseClick(device, "1050 83");
			Thread.sleep(28 * 1000L);
			//点击NPC
			ScreenCapture.mouseClick(device, "1268 503");
			Thread.sleep(2 * 1000L);
			ScreenCapture.mouseClick(device, "1213 352");
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return false;
	}

	@Override
	public boolean support(String area) {
		return SectEnums.LG.getCode().equals(area);
	}

	@Override
	public boolean goToPoint(RoleInfo roleInfo, String path, TuInfo tuInfo) {
		String device = roleInfo.getDevice();
		String area = tuInfo.getZuobiaoX()+" "+tuInfo.getZuobiaoY();
		// TODO Auto-generated method stub
		return false;
	}

}
